{tpl head}
<form action="" method="post" id="myForm">
    <table class="new_table" width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
        <thead>
        <tr class="n_bt"><td colspan="3" align="center">工作小助手系统</td></tr>
        <tr><th class="thbt" colspan="3">【{$title}】 <a href="?c=site&a=add">添加新的变量</a></th></tr>
        </thead>
        <tbody>
        {loop $oj $v}
        <tr>
            <td width="20%" height="30" align="right">{$v.des}：</td>

            <td width="32%" height="30">
                {if $v.type==1}
                <input name="filed[{$v.id}]" type="text" class="input400" id="title" size="30" value="{$v.values}" />
                {elseif $v.type==2}
                <textarea name="filed[{$v.id}]" cols="50"  class="input400 textareah" rows="4"  >{$v.values}</textarea>
                {elseif $v.type==3}
                <input  class="radio"name="filed[{$v.id}]" id="filed{$v.id}_1" type="radio" value="1" {if $v.values}checked="checked"{/if} />
                <label for="filed{$v.id}_1" class="trigger"></label>是
                <input name="filed[{$v.id}]" class="radio" type="radio" id="filed{$v.id}_2" value="0"  {if !$v.values}checked="checked"{/if} />
                <label for="filed{$v.id}_2" class="trigger"></label>否
                {elseif $v.type==4}
                <input name="filed[{$v.id}]" type="number" class="input400" id="title" size="30" value="{$v.values}" />
                {elseif $v.type==5}
                <input name="filed[{$v.id}]" type="url" class="input400" id="title" size="30" value="{$v.values}" />
                {elseif $v.type==6}
                <input name="filed[{$v.id}]" class="radio1" type="radio" id="filed{$v.id}_2" value="0"  {if !$v.values}checked="checked"{/if} />动态
                <input name="filed[{$v.id}]" class="radio1" type="radio" id="filed{$v.id}_2" value="1"  {if $v.values==1}checked="checked"{/if} />静态
                <input name="filed[{$v.id}]" class="radio1" type="radio" id="filed{$v.id}_2" value="2"  {if $v.values==2}checked="checked"{/if} />伪静态
                {/if}

            </td>
            <td width="45%" height="30">&nbsp; <a class="del" title="删除" href="?c=site&a=del&id={$v.id}">删除</a></td>
        </tr>
        {/loop}
        <tr>
            <td  height="30" align="right"></td>
            <td  height="40" align="left"><input type="submit" class="button" value="保存" />&nbsp;<input type="reset" class="button" value="取消设置" /></td>
            <td  height="30"></td>
        </tr>
        </tbody>
    </table>
    <input name="a" type="hidden" value="{$form_action}" />
</form>



<script>
    $(document).ready(function() {
        k_ajaxForm('#myForm',"",{if $id}false{else}true{/if});
    });
</script>
{tpl foot}